/**
 * @file Socket.hh
 * @author zziywang (zziywang@163.com)
 * @brief { life is too short to learn cpp! }
 * @version 1.0
 * @date 2022-05-06
 *
 * @copyright Copyright (c) 2022
 *
 */

#pragma once

namespace snow
{

// 套接字描述符的创建和析构，RAII
class Socket
{
public:
    Socket();
    Socket(int fd);
    ~Socket();
    void shutdownWrite(); // TCP全双工，主动关闭写端，并不释放
    int getFd() const;    // 返回文件描述符

private:
    int fd_;
};

} // namespace snow